package cn.itcast.domain;


import cn.itcast.group.Find;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Accounts implements Serializable {
    @NotNull(message = "id不能为空",groups = Find.class)
    private Integer id;

    @NotBlank(message = "name不能为空",groups = Find.class)
    private String name;

    @NotNull(message = "金额不能为空",groups = Find.class)
    @Max(message = "金额不能超过5000",value = 5000)
    @Min(message = "金额不能为小于0",value = 0)
    private double money;
//    @NotNull(message = "值不能为空" ,groups = Page.class)
//    private Integer pageNum;
//    @NotNull(message = "值不能为空",groups = Page.class)
//    private Integer PageSize;
}

